import request from '@/utils/request'

// 查询触发器列表列表
export function listList(query) {
  return request({
    url: '/system/list/list',
    method: 'get',
    params: query
  })
}

// 查询触发器列表详细
export function getList(id) {
  return request({
    url: '/system/list/' + id,
    method: 'get'
  })
}

// 新增触发器列表
export function addList(data) {
  return request({
    url: '/system/list',
    method: 'post',
    data: data
  })
}

// 修改触发器列表
export function updateList(data) {
  return request({
    url: '/system/list',
    method: 'put',
    data: data
  })
}

// 删除触发器列表
export function delList(id) {
  return request({
    url: '/system/list/' + id,
    method: 'delete'
  })
}
  //修改触发器状态
export function changeListStatus(id,status){
  const data = {
    id,
    status
  }
  return request({
    url: '/system/list/changeListStatus',
    method : 'put',
    data: data
  })
}
//设备类型
export function listDeviceName(query) {
  return request({
    url: '/system/list/listDeviceName',
    method: 'get',
    params: query
  })
}

